<?php

use Illuminate\Database\Seeder;

class ManagerTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $faker = Faker\Factory::create("zh_CN");
        for ($i=0;$i<50;$i++) {
            $data[] = [
                'name' => $faker->name,
                'username' => $faker->username,
                'password' => bcrypt("123456"),
                'gender' => mt_rand(1, 3),
                'mobile' => $faker->phoneNumber,
                'email' => $faker->email,
                'role_id' => mt_rand(1, 3),
                'created_at' => date('y-m-d H:i:s', time()),
                'status' => mt_rand(1, 2)
            ];

        }
        DB::table('manager')->insert($data);


        //
    }
}
